<?php
namespace Events\Form;

use Zend\InputFilter\InputFilter;

class AddResource2EventFilter extends InputFilter
{

    public function __construct()
    {

        $this->add(array(
            'name' => 'RESOURCE',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
        
            )
        ));
        
        $this->add(array(
            'name' => 'DURATION',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                ),
                array(
                    'name' => 'Between',
                    'options' => array(
                        'min' => 0,
                        'max' => 10000,
                        'messages' => array(
                            \Zend\Validator\Between::NOT_BETWEEN => 'exceeded the muximum'
                        )
                    ),
                ),
            )
        ));
        
        $this->add(array(
            'name' => 'DATE',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
        
            )
        ));        

        
        $this->add(array(
            'name' => 'STARTING_TIME',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
        
            )
        ));
    
      
    }
}